<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../lib/vue-2.6.7.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="../es6/promise/promise-ajax.js"></script>
    <style type="text/css">
    </style>
</head>
<body>
<div id="app">
</div>
<script>
    const vm = new Vue({
        el: "#app",
        created() {
            this.getCarts();
        },
        data: {
            getCarts() {
             /*   axios.get('../mock/carts.json').then(res=>{
                    this.carts = res.data.orderData;
                },err=>{
                    console.log(err);
                })*/
             ajax({url:'../mock/carts.json'}).then(res=>{
                   this.carts = res.orderData;
                },err=>{
                    console.log(err);
                })
            },
            carts:{}
        }
    })
</script>
</body>
</html>